feat: migrate resource management to utopia-php/di container (0.33.x backport)#224
Closed
ChiragAgg5k wants to merge 1 commit into0.33.xfrom
Closed
feat: migrate resource management to utopia-php/di container (0.33.x backport)#224ChiragAgg5k wants to merge 1 commit into0.33.xfrom
ChiragAgg5k wants to merge 1 commit into0.33.xfrom
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This backports the DI container integration from the 0.34.x branch to 0.33.x: - Replace internal array-based resource management with Utopia\DI\Container - Update constructor to accept optional Container parameter - Add getContainer() and getRequestContainer() methods - Change setResource() from static to instance method - Update getResource() and getResources() to use Container scope - Create request-scoped containers for each request lifecycle - Update all internal calls to use new container-based API - Remove static resource callbacks array - Update adapters to remove static Http::setResource() calls - Update tests to use container-based approach BREAKING CHANGE: Http::setResource() is now an instance method instead of static. Users should now call $http->setResource() instead of Http::setResource().
f7975c6 to
90b7249
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR backports the DI container integration from the 0.34.x branch (
feat/use-di-resource-container) to the 0.33.x branch.Changes
utopia-php/diContainerContainerparameter toHttpconstructorgetContainer()andgetRequestContainer()for accessing the DI containersetResource()changed from static to instance methodgetResource()andgetResources()now require a Container scope parameterHttp::setResource()calls from FPM and Swoole adaptersDependencies
utopia-php/di: 0.3.*to composer.jsonBreaking Changes
Http::setResource()is now an instance method instead of static.Before:
After:
Testing
Related
This is a backport of the changes from PR targeting 0.34.x to ensure 0.33.x branch also benefits from the improved resource management architecture.